//-------------------------------------------------------------------------------//
//                         QUIMERA ENGINE : LICENSE                              //
//-------------------------------------------------------------------------------//
// This file is part of Quimera Engine.                                          //
// Quimera Engine is free software: you can redistribute it and/or modify        //
// it under the terms of the Lesser GNU General Public License as published by   //
// the Free Software Foundation, either version 3 of the License, or             //
// (at your option) any later version.                                           //
//                                                                               //
// Quimera Engine is distributed in the hope that it will be useful,             //
// but WITHOUT ANY WARRANTY; without even the implied warranty of                //
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the                  //
// Lesser GNU General Public License for more details.                           //
//                                                                               //
// You should have received a copy of the Lesser GNU General Public License      //
// along with Quimera Engine. If not, see <http://www.gnu.org/licenses/>.        //
//                                                                               //
// This license doesn't force you to put any kind of banner or logo telling      //
// that you are using Quimera Engine in your project but we would appreciate     //
// if you do so or, at least, if you let us know about that.                     //
//                                                                               //
// Enjoy!                                                                        //
//                                                                               //
// Kinesis Team                                                                  //
//-------------------------------------------------------------------------------//

#include "QStackAllocatorWhiteBox.h"


namespace Kinesis
{
namespace QuimeraEngine
{
namespace Common
{
namespace Memory
{
namespace Test
{


//##################=======================================================##################
//##################			 ____________________________			   ##################
//##################			|							 |			   ##################
//##################		    |  ATTRIBUTES INITIALIZATION |			   ##################
//##################		   /|							 |\			   ##################
//##################			 \/\/\/\/\/\/\/\/\/\/\/\/\/\/			   ##################
//##################													   ##################
//##################=======================================================##################

const pointer_uint_q QStackAllocatorWhiteBox::QMarkMocked::QMARKMOCKED_OFFSET_VALUE = 0X100;


//##################=======================================================##################
//##################			 ____________________________			   ##################
//##################			|							 |			   ##################
//##################		    |		    METHODS			 |			   ##################
//##################		   /|							 |\			   ##################
//##################			 \/\/\/\/\/\/\/\/\/\/\/\/\/\/			   ##################
//##################													   ##################
//##################=======================================================##################

void QStackAllocatorWhiteBox::QMarkMocked::SabotageMarkToNull()
{
   this->m_pMemoryAddress = null_q;
}

void QStackAllocatorWhiteBox::QMarkMocked::SabotageMarkToLesserMemoryAddress()
{
    pointer_uint_q uAux  = rcast_q(m_pMemoryAddress, pointer_uint_q);
    uAux                -= QMARKMOCKED_OFFSET_VALUE;
    m_pMemoryAddress     = rcast_q(uAux, void*);
}

void QStackAllocatorWhiteBox::QMarkMocked::SabotageMarkToGreaterMemoryAddress()
{
    pointer_uint_q uAux  = rcast_q(m_pMemoryAddress, pointer_uint_q);
    uAux                += QMARKMOCKED_OFFSET_VALUE;
    m_pMemoryAddress     = rcast_q(uAux, void*);
}


} //namespace Test
} //namespace Memory
} //namespace Common
} //namespace QuimeraEngine
} //namespace Kinesis
